<?php

namespace Sharks\Core\Path;

/**
 * 程序应用的各项访问目录
 */
class AppPathKit {

    protected $root;
    protected $source;
    protected $public;
    protected $storage;

    public function __construct($appPath) {
        $this->root = $appPath;
        $this->source = "$appPath/Source";
        $this->public ="$appPath/Public";
        $this->storage = "$appPath/Storage";
    }

    public function __get($name) {
        if (in_array($name, array('root', 'source', 'public', 'storage'))) {
            return $this->$name;
        }
    }
}